package org.liuqm.proxy.staticproxy;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.liuqm.example.mapper.ISysUserMapper;

import java.io.IOException;
import java.util.HashMap;

public class StaticProxyTest {


    public static void main(String[] args) throws IOException, InterruptedException {
//        Buyer buyer = new BuyerProxy(new XiaoBuyer());
//        Object o1 = buyer.buyer();
//        System.out.println(o1);
//        Buyer buyer1 = new BuyerProxy(new XiaoMeiBuyer());
//        Object o = buyer1.buyer();
//        System.out.println(o);

//        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder() .build(Resources.getResourceAsReader(""));
//       SqlSession session= sqlSessionFactory.openSession();
//
//        session.getMapper(ISysUserMapper.class).count();

        StringUtils stringUtils = new StrintStaticProxy();
        stringUtils.MapToString(new HashMap());
//
    }
}
